package com.wt.admin.service.model.impl;

import com.wt.admin.domain.dto.model.ModelListDTO;
import com.wt.admin.domain.vo.model.ModelListVO;
import com.wt.admin.service.image.ImageProxyService;
import com.wt.admin.service.language.LanguageProxyService;
import com.wt.admin.service.model.ModelListService;
import com.wt.admin.service.model.ModelProxyService;
import com.wt.admin.util.PageUtil;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;


@Service
public class ModelProxyServiceImpl implements ModelProxyService {

    @Resource
    private LanguageProxyService languageProxyService;
    @Resource
    private ImageProxyService imageProxyService;
    @Resource
    private ModelListService modelListService;

    @Override
    public PageUtil.PageVO<ModelListVO> modelList(PageUtil.PageDTO<ModelListDTO> data) {
        return modelListService.modelList(data);
    }

    @Override
    public ModelListVO modelTest(ModelListDTO data) {
        return switch (data.getModelType()){
            case 1 -> languageProxyService.classTest(data);
            case 2 -> languageProxyService.qaTest(data);
            case 3 -> imageProxyService.test(data);
            default -> null;
        };
    }

    @Override
    public ModelListVO modelDel(ModelListDTO data) {
        return modelListService.modelDel(data);
    }

    @Override
    public ModelListVO fineTune(ModelListDTO data) {
        return null;
    }

}
